// for.asm
section text
    local a:int
    local b:int
    local code:int

    push0
    calldataload
    push 0xe0
    shr
    store code

    ifnot code == 0xa5f3c23b, next

    push 0x4
    calldataload
    store a

    push 0x24
    calldataload
    store b

    add(a, b)
    push0
    mstore
    jump exit

next:
    ifnot code == 0x13bdfacd, exit
    print()

    push0
    push0
    mstore
    jump exit

exit:
    push1 0x20
    push0
    return
    
// 0xa5f3c23b
// 0000000000000000000000000000000000000000000000000000000000000012
// 0000000000000000000000000000000000000000000000000000000000000034
add(a:int, b:int)int:
    local c:int

    add a, b
    store c
    return c

// 0x13bdfacd
print():
    local i:int
    local j:int
    local k:int

    for (i = 0; i < 2; i++)
        for (j = 0; j < 2; j ++)
            for (k = 0; k < 2; k ++)
                push (i+j)*(k+j)
                print
            endfor
        endfor
    endfor

// test 0xa5f3c23b00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000034,0x0000000000000000000000000000000000000000000000000000000000000046
// @test 0x13bdfacd,0x0000000000000000000000000000000000000000000000000000000000000000